﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Linq.Expressions;

namespace DlrBasic.Parser
{
    public class StateMemberGenerator
    {
        Expression stateExpression;

        public StateMemberGenerator(Expression stateExpression)
        {
            this.stateExpression = stateExpression;
        }

        internal Expression GetStatementCallbackDelegate()
        {
            return Expression.Property(stateExpression, "StatementCallback");
        }

        internal Expression GetMemoryVariable()
        {
            return Expression.Property(stateExpression, "Memory");
        }

        internal Expression GetCurrentStatementVariable()
        {
            return Expression.Property(stateExpression, "CurrentStatement");
        }

        internal Expression GetForStackVariable()
        {
            return Expression.Property(stateExpression, "ForStack");
        }

        internal Expression GetUserFunctionsVariable()
        {
            return Expression.Property(stateExpression, "UserFunctions");
        }

        internal Expression GetGosubStackVariable()
        {
            return Expression.Property(stateExpression, "GosubStack");
        }

        internal Expression GetDebugInfoVariable()
        {
            return Expression.Property(stateExpression, "DebugInfo");
        }

    }
}
